package com.ruoyi.carowner.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.carowner.mapper.CarownerPaymentRecordsMapper;
import com.ruoyi.carowner.domain.CarownerPaymentRecords;
import com.ruoyi.carowner.service.ICarownerPaymentRecordsService;

/**
 * 支付记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CarownerPaymentRecordsServiceImpl implements ICarownerPaymentRecordsService {
    @Autowired
    private CarownerPaymentRecordsMapper carownerPaymentRecordsMapper;

    /**
     * 查询支付记录
     *
     * @param id 支付记录主键
     * @return 支付记录
     */
    @Override
    public CarownerPaymentRecords selectCarownerPaymentRecordsById(Long id) {
        return carownerPaymentRecordsMapper.selectCarownerPaymentRecordsById(id);
    }

    /**
     * 查询支付记录列表
     *
     * @param carownerPaymentRecords 支付记录
     * @return 支付记录
     */
    @Override
    public List<CarownerPaymentRecords> selectCarownerPaymentRecordsList(CarownerPaymentRecords carownerPaymentRecords) {
        return carownerPaymentRecordsMapper.selectCarownerPaymentRecordsList(carownerPaymentRecords);
    }

    @Override
    public List<CarownerPaymentRecords> selectRecordsBystatus(Integer user_id) {
        return carownerPaymentRecordsMapper.selectRecordsBystatus(user_id);
    }

    @Override
    public List<CarownerPaymentRecords> selectBystatus(Integer user_id) {
        return carownerPaymentRecordsMapper.selectBystatus(user_id);
    }

    @Override
    public List<CarownerPaymentRecords> selectByUserId(Integer user_id) {
        return carownerPaymentRecordsMapper.selectByUserId(user_id);
    }

    /**
     * 新增支付记录
     *
     * @param carownerPaymentRecords 支付记录
     * @return 结果
     */
    @Override
    public int insertCarownerPaymentRecords(CarownerPaymentRecords carownerPaymentRecords) {
        return carownerPaymentRecordsMapper.insertCarownerPaymentRecords(carownerPaymentRecords);
    }

    /**
     * 修改支付记录
     *
     * @param carownerPaymentRecords 支付记录
     * @return 结果
     */
    @Override
    public int updateCarownerPaymentRecords(CarownerPaymentRecords carownerPaymentRecords) {
        return carownerPaymentRecordsMapper.updateCarownerPaymentRecords(carownerPaymentRecords);
    }

    /**
     * 批量删除支付记录
     *
     * @param ids 需要删除的支付记录主键
     * @return 结果
     */
    @Override
    public int deleteCarownerPaymentRecordsByIds(Long[] ids) {
        return carownerPaymentRecordsMapper.deleteCarownerPaymentRecordsByIds(ids);
    }

    /**
     * 删除支付记录信息
     *
     * @param id 支付记录主键
     * @return 结果
     */
    @Override
    public int deleteCarownerPaymentRecordsById(Long id) {
        return carownerPaymentRecordsMapper.deleteCarownerPaymentRecordsById(id);
    }
}
